<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <title>01事件绑定入门案例</title>
</head>

<body>
  <!-- 测试按钮标签 -->
  <input id="dianwo" type="button"  value="点我试试" />



</body>

<script type="text/javascript">
  let btn = document.getElementById("dianwo");
  // 按钮点击事件绑定到匿名函数
  btn.onclick=function(){
    alert("需要什么服务！")
  }
 
</script>

</html>